home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
compuserve-file-archive
/
08 System Utilities
/
DIRECT.BIN
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
8KB
|
154 lines
10 POKE56,64:CLR:GOTO2015
15 PRINT"[147]"
20 PRINT"ENTER DEVICE #, TO LOAD DISK DIRECTORY."
22 PRINT"(ENTER 0 TO EXIT.)"
25 PRINT" 8[145]":INPUTD
30 IFD-8AND252THENPOKE56,160:END
31 POKE186,D
32 SYS50141:REM OPEN CHANNEL TO DOS BUFFER
33 IFPEEK(783)AND1THEN600
34 T=56334:POKET,.
35 SYS51432:REM OPEN COMMAND CHANNEL
36 POKE251,.:POKE252,64
37 PRINT"[147]LOADING DIRECTORY FROM DISK"
40 SYS49631:REM LOAD DIRECTORY BLOCKS INTO RAM
42 SYS51504:REM (143) = # OF FILE ENTRIES
50 SYS51453:REM PRINT HEADER TO SCREEN
60 PRINT"PRESS F1 TO VIEW DIRECTORY."
70 PRINT"PRESS F3 TO ARRANGE IN DESIRED ORDER."
80 PRINT"PRESS F5 FOR ALPHABETICAL ORDER."
90 PRINT"PRESS F7 TO EXIT."
95 POKET,1
100 GETA$:IFA$=CHR$(133)THENF=1:GOTO150
110 IFA$=CHR$(134)THEN270
120 IFA$=CHR$(135)THEN180
130 IFA$=CHR$(136)THENPOKE56,160:END
140 GOTO100
150 PRINT"[147] USE CURSOR UP/DOWN TO SCROLL."
160 PRINT" PRESS RETURN FOR LAST MENU."
165 PRINT"****************************************"
166 IFFTHEN400
167 SYS51562:REM INITIALIZE REGISTERS
168 SYS49475:REM PRINT FIRST 22 LINES TO SCREEN
169 SYS51515:REM INITIALIZE REGISTERS
170 SYS50685:REM GET FROM KEYBOARD BUFFER
176 SYS51453:REM PRINT HEADER TO SCREEN
177 PRINT"":GOTO200
180 POKET,.:POKE2,.:PRINT"[147]ONE MOMENT PLEASE..."
181 SYS51777:REM FORMAT DISK NAME DATA AND TRANSFER
182 SYS49193:REM FORMAT FILE ENTRY DATA AND TRANSFER
183 SYS49841:REM FORMAT # OF FREE BLOCKS DATA AND TRANSFER
184 SYS51825:REM NUMBER FILE ENTRIES IN DIRECTORY ORDER
185 SYS51583:REM NUMBER FILE ENTRIES SEQUENTIALLY
186 SYS51881:REM LINEAR SORT
188 SYS51647:REM TRANSFER DATA AND REVERSE VIDEO
190 SYS51453:REM PRINT HEADER TO SCREEN
195 F=.:PRINT" DONE"
198 PRINT" [163][163][163][163]"
200 PRINT"PRESS F1 TO SAVE PROCESSED DIRECTORY"
205 PRINT"BACK TO DISK."
210 PRINT"PRESS F3 TO VIEW RESULTS."
215 PRINT"PRESS F5 TO WORK ON ORIGINAL DIRECTORY."
220 PRINT"PRESS F7 TO LOAD DISK DIRECTORY."
225 POKET,1
230 GETA$:IFA$=CHR$(133)THEN750
240 IFA$=CHR$(134)THEN150
250 IFA$=CHR$(135)THEN50
255 IFA$=CHR$(136)THEN15
260 GOTO230
265 SYS51453:REM PRINT HEADER TO SCREEN
267 PRINT"":GOTO200
270 SYS51453:REM PRINT HEADER TO SCREEN
275 PRINT"MOVE POINTER WITH CURSOR UP/DOWN"
280 PRINT"TO SELECTION FOR FIRST DIRECTORY ENTRY"
290 PRINT"AND PRESS F1. ENTRY WILL APPEAR AT TOP"
300 PRINT"OF LIST IN REVERSE VIDEO. REPEAT FOR"
310 PRINT"SECOND CHOICE, ETC. SELECTIONS WILL"
320 PRINT"LINE UP IN REVERSE VIDEO. PRESS F3 TO"
330 PRINT"CANCEL LAST SELECTION. PRESS L TO LOCK"
340 PRINT"FILE. SHIFTED L TO UNLOCK. S, P, U, TO"
350 PRINT"CHANGE FILE TYPE TO SEQ, PRG, USR."
355 PRINT"R TO RESET DIRECTORY."
360 PRINT"WHEN FINISHED, PRESS RETURN FOR MENU."
365 PRINT"PRESS RETURN WHEN READY.";
370 GETA$:IFA$=CHR$(13)THEN380
375 GOTO370
380 PRINT"[147] CURSOR U/D MOVES POINTER."
385 PRINT" S, P, U, L = SEQ, PRG, USR, LOCK."
390 PRINT"[204] = UNLOCK. F1 = SELECT. F3 = CANCEL.";
395 PRINT"R = RESET. RETURN = MENU.";
397 PRINT"****************************************"
399 GOTO650
400 POKET,.:POKE2,.
440 SYS49793:REM FORMAT DISK NAME DATA AND TRANSFER
445 SYS49193:REM FORMAT FILE ENTRY DATA AND TRANSFER
450 SYS49841:REM FORMAT # OF FREE BLOCKS DATA AND TRANSFER
455 SYS51562:REM INITIALIZE REGISTERS
457 SYS49475:REM PRINT FIRST 22 LINES TO SCREEN
460 SYS51515:REM INITIALIZE REGISTERS
465 POKET,1
470 SYS50685:REM GET FROM KEYBOARD BUFFER
475 GOTO50
600 PRINT"[147]?DEVICE";D;"NOT PRESENT":CLR:GOTO20
650 POKET,.:POKE2,.
652 SYS49793:REM FORMAT DISK NAME DATA AND TRANSFER
655 SYS49193:REM FORMAT FILE ENTRY DATA AND TRANSFER
657 SYS49841:REM FORMAT # OF FREE BLOCKS DATA AND TRANSFER
660 SYS51532:REM INITIALIZE REGISTERS
662 SYS49475:REM PRINT FIRST 20 LINES TO SCREEN
665 SYS51553:REM INITIALIZE REGISTERS
675 SYS49934:REM ADD ARROWS AND INDICES TO FILE DATA
677 SYS50966:REM PRINT ARROW TO SCREEN
680 POKET,1
685 SYS50414:REM GET FROM KEYBOARD BUFFER
690 SYS51453:REM PRINT HEADER TO SCREEN
691 PRINT"PRESS F1 TO SAVE PROCESSED DIRECTORY"
692 PRINT"BACK TO DISK."
695 PRINT"PRESS F3 TO RETURN TO ARRANGE MODE."
700 PRINT"PRESS F5 TO WORK ON ORIGINAL DIRECTORY."
705 PRINT"PRESS F7 TO LOAD DISK DIRECTORY."
710 GETA$:IFA$=CHR$(133)THEN740
715 IFA$=CHR$(134)THEN800
720 IFA$=CHR$(135)THEN50
725 IFA$=CHR$(136)THEN15
730 GOTO710
740 F=1
750 SYS51453:REM PRINT HEADER TO SCREEN
755 PRINT"IF YOU PRESS F1, ALL DIRECTORY ENTRIES,"
760 PRINT"BOTH SELECTED AND UNSELECTED, WILL BE"
765 PRINT"WRITTEN BACK TO DISK."
770 PRINT"OR PRESS F3 FOR LAST MENU."
775 GETA$:IFA$=CHR$(133)THEN790
780 IFA$=CHR$(134)THEN787
785 GOTO775
787 IFFTHEN690
788 GOTO265
790 SYS51014:REM REARRANGE AND MODIFY FILE DATA
792 PRINT"[147]SAVING DIRECTORY TO DISK"
793 SYS50141:REM OPEN CHANNEL TO DOS BUFFER
794 SYS51432:REM OPEN COMMAND CHANNEL
795 SYS51284:REM SAVE DIRECTORY TO DISK
799 GOTO15
800 PRINT"[147] CURSOR U/D MOVES POINTER."
805 PRINT" S, P, U, L = SEQ, PRG, USR, LOCK."
810 PRINT"[204] = UNLOCK. F1 = SELECT. F3 = CANCEL.";
815 PRINT"R = RESET. RETURN = MENU.";
820 PRINT"****************************************"
840 SYS50880:REM PRINT TO SCREEN STARTING WITH LAST SELECTION
845 SYS50414:REM GET FROM KEYBOARD BUFFER
855 GOTO690
1000 OPEN15,8,15
1010 INPUT#15,A,B$,C,D
1020 PRINTA:PRINTB$:PRINTC,D
1030 CLOSE15:END
2015 PRINT"[147]ONE MOMENT PLEASE..."
2020 P=PEEK(45)+256*PEEK(46)-1
2025 IFPEEK(P)THENP=P-1:GOTO2025
2030 FORI=.TO22:READY:POKE52000+I,Y:NEXT
2035 POKE53,243:POKE54,202:POKE251,12:POKE252,245
2040 POKE254,P/256:POKE253,PAND255:SYS52000
2045 POKE2063,48:GOTO15
2050 DATA160,0,177,253,145,53,152,208
2055 DATA4,198,54,198,254,136,230,251
2060 DATA208,240,230,252,208,236,96